<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pg Web for {{pageData["schema"] }}</title>
{% if not environment.SUB  ==""%}
<link rel="stylesheet" type="text/css" href="/templates/{{pageData['subdomain']}}/css/style.css" />
{% else %}
<link rel="stylesheet" type="text/css" href="/templates/include/style.css" />
{% endif %}
<script type="text/javascript" src="/templates/include/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/templates/include/jquery.livequery.js"></script>
<script src="/templates/include/jquery.livequery.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/templates/include/jquery.validate.js"></script>

<style type="text/css">@import "/templates/include/jquery.datepick.css";</style>
<script type="text/javascript" src="/templates/include/jquery.datepick.js"></script>
<script type="text/javascript" src="/templates/include/jquery.datepick-it.js"></script>

<script type="text/javascript" src="/templates/include/jquery.autoSuggest.packed.js"></script>
<link type="text/css" rel="stylesheet" href="/templates/include/autoSuggest.css" />

<script type="text/javascript">
$(document).ready(function(){
$("div#chiudi").hide()
$("div#daoaddedit").hide()
$("a.new").livequery('click',function(){
$("div#chiudi").show()
var daod = $(this).attr("dao")
$("div#searchBox").hide()
$("div#filterbox").hide()
$("div#preview").hide()
$("div#nav").hide()
$("div#daoaddedit").animate({
    width: "98%",
    height: "auto",
    }, 1000 ),
$('div#daoaddedit').load('../../daoadd',{"dao":daod })
});

$("a#chiudilink").click(function(){
$("div#searchBox").show();
$("div#filterbox").show();
$("div#preview").show();
$("div#nav").show();
$("div#chiudi").hide()
$("div#daoaddedit").hide();
$('div#preview').empty()

    });

$('a.delete')
    .livequery('click', function(event) {
    var idrr = $(this).attr("id");
    var dao = $(this).attr("dao");
    $('div#filterbox').load('../../delete',{ 'idr':idrr,"dao":dao });
    alert('Cancellato');
    return false;
    });


$('a.edit')
    .livequery('click', function(event) {
    $("div#chiudi").show()
    $("div#searchBox").hide()
    $("div#filterbox").hide()
    $("div#preview").hide();
    $("div#daoaddedit").animate({
    width: "98%",
    }, 1000 )
    var idrrr = $(this).attr("id");
    var daos = $(this).attr("dao");
    $('div#daoaddedit').load('../../edit',{ 'idr':idrrr,"dao":daos });
    });

$("a.item").livequery('click',function(){
var idrr = $(this).attr("id")
var dao = $(this).attr("dao")
$('div#preview').load('../../preview',{ 'idr':idrr,"dao":dao });
});



});
</script>

</head>
